package com.example.java2e.Service.Impl;

import com.example.java2e.Dao.VehicleDao;
import com.example.java2e.Entity.Vehicle;
import com.example.java2e.Service.VehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VehicleServiceImpl implements VehicleService {
    @Autowired
    private VehicleDao VehicleDao;
    @Override
    public void addVehicle(String id, String type, String status, double mileage, String check_time, long capacity){
        VehicleDao.addVehicle(id,type,status,mileage,check_time,capacity);
    }
    @Override
    public void changeVehicleInfo(String id, String type, String status, double mileage, String check_time, long capacity){
        VehicleDao.changeVehicleInfo(id,type,status,mileage,check_time,capacity);
    }
    @Override
    public List<Vehicle> checkVehicleInfo(){
        return VehicleDao.checkVehicleInfo();
    }
    @Override
    public Vehicle checkVehicleInfoDetail(String id){
        return VehicleDao.checkVehicleInfoDetail(id);
    }
    @Override
    public void deleteVehicle(String id){
        VehicleDao.deleteVehicle(id);
    }
}
